import { dropRight } from "lodash";

export const tableOption = {
  "border": true,
  "index": false,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  menuWidth: 300,
  menu: false,
  viewBtn: true,
  labelWidth: 140,
  columnBtn: false,
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "housingId",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      viewDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "序号",
      "prop": "index",
      width: 60,
      slot: true,
      editDisplay: false,
      addDisplay: false,
      showColumn: false,
      "span": 12
    },	  {
      "type": "select",
      "label": "地址",
      "prop": "areaId",
      formslot: true,
      slot: true,
      width: 300,
      rules: [{
        required: true,
        message: '请选择地址',
      }],
      "span": 12
    },	  {
      "type": "input",
      "label": "地址",
      "prop": "address",
      showColumn: false,
      hide: true,
      addDisplay: false,
      editDisplay: false,
      search: true,
      "span": 12
    },	  {
      "label": "房号",
      search: true,
      "prop": "roomNumber",
      slot: true,
      "type": "input",
      maxlength: 32,
      rules: [{
        required: true,
        message: "请输入房号",
      }],
      "span": 12
    },	  {
      "label": "床位号",
      "prop": "bedNumber",
      "type": "input",
      formslot: true,
      slot: true,
      addDisplay: false,
      editDisplay: false,
      "span": 24
    },	  {
      "type": "select",
      "label": "使用状态",
      hide: true,
      showColumn: false,
      "prop": "status",
      rules: [{
        required: true,
        message: '请选择使用状态',
      }],
      search: true,
      dicUrl: '/admin/dict/type/housing_use_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "使用状态",
      width: 100,
      "prop": "status1",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      dicUrl: '/admin/dict/type/housing_use_status',
      "span": 12
    },	  {
      "type": "input",
      search: true,
      "label": "居住人姓名",
      searchLabelWidth: 100,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      width: 120,
      "prop": "residentRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系电话",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      width: 120,
      "prop": "residentPhone",
      "span": 12
    },	  {
      "type": "select",
      "label": "性别",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      width: 120,
      dicUrl: '/admin/dict/type/gender',
      "prop": "residentSex",
      "span": 12
    },	  {
      "type": "input",
      "label": "部门",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      search: true,
      "prop": "residentDeptName",
      "span": 12
    },	  {
      "type": "select",
      "label": "人员类别",
      addDisplay: false,
      search: true,
      width: 100,
      editDisplay: false,
      viewDisplay: false,
      "prop": "residentType",
      dicUrl: '/admin/dict/type/personnel_type',
      "span": 12
    // },	  {
    //   "type": "select",
    //   "label": "人员级别",
    //   addDisplay: false,
    //   width: 100,
    //   editDisplay: false,
    //   viewDisplay: false,
    //   dicUrl: '/admin/dict/type/post_level',
    //   "prop": "residentPostRank",
    //   "span": 12
    },	  {
      "type": "select",
      "label": "职务",
      addDisplay: false,
      width: 100,
      search: true,
      editDisplay: false,
      viewDisplay: false,
      dicUrl: '/admin/sysposition/page',
      dicQuery: {
        size: -1
      },
      props: {
          label: "name",
          value: "id",
          res: "data.records",
      },
      "prop": "residentPost",
      "span": 12
    },	  {
      "type": "select",
      "label": "房屋类型",
      search: true,
      "prop": "housingType",
      editDisabled: true,
      width: 100,
      rules: [{
        required: true,
        message: '请选择房屋类型',
      }],
      dicUrl: '/admin/dict/type/housing_type',
      "span": 12
    },	  {
      "type": "select",
      search: true,
      addDisplay: false,
      editDisplay: false,
      "label": "合同状态",
      width: 100,
      "prop": "contractStatus",
      dicUrl: '/admin/dict/type/housing_contract_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "室内结构",
      "prop": "structure",
      width: 100,
      rules: [{
        required: true,
        message: '请选择室内结构',
      }],
      dicUrl: '/admin/dict/type/housing_structure',
      "span": 12
    },	  {
      "type": "select",
      "label": "朝向",
      "prop": "toward",
      rules: [{
        required: true,
        message: '请选择朝向',
      }],
      dicUrl: '/admin/dict/type/housing_toward',
      "span": 12
    },	  {
      "type": "number",
      "label": "建筑面积",
      width: 100,
      maxRows: 999,
      rules: [{
        required: true,
        message: "请输入建筑面积",
      }],
      "prop": "constructionArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "套里面积",
      width: 100,
      maxRows: 999,
      rules: [{
        required: true,
        message: "请输入套里面积",
      }],
      "prop": "usageArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "分摊面积",
      width: 100,
      addDisplay: false,
      slot: true,
      editDisplay: false,
      viewDisplay: false,
      maxRows: 999,
      "prop": "sharingArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "房间面积",
      width: 100,
      addDisplay: false,
      slot: true,
      editDisplay: false,
      viewDisplay: false,
      maxRows: 999,
      "prop": "roomArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "计租面积",
      width: 100,
      slot: true,
      maxRows: 999,
      rules: [{
        required: true,
        message: "请输入计租面积",
      }],
      "prop": "rentArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "预设租金",
      width: 100,
      slot: true,
      rules: [{
        required: true,
        message: "请输入预设租金",
      }],
      maxRows: 10000000,
      "prop": "defaultRent",
      "span": 12
    },	  {
      "type": "input",
      "label": "产权证号",
      width: 100,
      maxlength: 48,
      rules: [{
        required: true,
        message: "请输入产权证号",
      }],
      "prop": "propertyNumber",
      "span": 12
    },	  {
      "type": "input",
      "label": "水",
      "prop": "water",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "电",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "prop": "electricity",
      "span": 12
    },	  {
      "type": "input",
      "label": "气",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "prop": "gas",
      "span": 12
    },	  {
      "type": "input",
      "label": "属权",
      "prop": "property",
      maxlength: 128,
      rules: [{
        required: true,
        message: "请输入属权",
      }],
      "span": 12
    },	  {
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      hide: true,
      maxlength: 256,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      rules: [{
        required: true,
        trigger: 'blue',
        message: "请上传结构图",
      }],
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      hide: true,
      action: "/act/file/upload",
      "label": "结构图",
      "prop": "cover"
    // },	  {
    //   "type": "input",
    //   "label": "附件",
    //   "prop": "attachment",
    //   "span": 12
    // },	  {
    //   "type": "number",
    //   "label": "排序",
    //   "prop": "sort",
    //   hide:true,
    //   maxRows: 1000000,
    //   "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      editDisabled: true,
      addDisplay: false,
      hide: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "操作",
      "prop": "operate",
      slot: true,
      editDisplay: false,
      showColumn: false,
      viewDisplay: false,
      addDisplay: false,
      fixed: 'right',
      width: 300,
      "span": 12
    }  ]
}

export const tableOption1 = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  menuWidth: 300,
  menu: false,
  viewBtn: true,
  labelWidth: 140,
  columnBtn: false,
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "housingId",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      viewDisplay: false,
      "span": 12
    },	  {
      "type": "select",
      "label": "地址",
      "prop": "areaId",
      formslot: true,
      slot: true,
      width: 300,
      rules: [{
        required: true,
        message: '请选择地址',
      }],
      "span": 12
    },	  {
      "type": "input",
      "label": "地址",
      "prop": "address",
      showColumn: false,
      hide: true,
      addDisplay: false,
      editDisplay: false,
      search: true,
      "span": 12
    },	  {
      "label": "房号",
      search: true,
      "prop": "roomNumber",
      slot: true,
      "type": "input",
      maxlength: 32,
      rules: [{
        required: true,
        message: "请输入房号",
      }],
      "span": 12
    },	  {
      "label": "床位号",
      "prop": "bedNumber",
      "type": "input",
      slot: true,
      addDisplay: false,
      editDisplay: false,
      "span": 12
    },	  {
      "type": "select",
      "label": "使用状态",
      hide: true,
      showColumn: false,
      "prop": "status",
      rules: [{
        required: true,
        message: '请选择使用状态',
      }],
      search: true,
      dicUrl: '/admin/dict/type/housing_use_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "使用状态",
      "prop": "status1",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      dicUrl: '/admin/dict/type/housing_use_status',
      "span": 12
    },	  {
      "type": "input",
      search: true,
      searchLabelWidth: 100,
      "label": "居住人姓名",
      addDisplay: false,
      editDisplay: false,
      width: 120,
      "prop": "residentRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "部门",
      addDisplay: false,
      editDisplay: false,
      search: true,
      "prop": "residentDeptName",
      "span": 12
    },	  {
      "type": "select",
      "label": "人员类别",
      addDisplay: false,
      search: true,
      editDisplay: false,
      "prop": "residentType",
      dicUrl: '/admin/dict/type/personnel_type',
      "span": 12
    },	  {
      "type": "select",
      "label": "人员级别",
      addDisplay: false,
      editDisplay: false,
      dicUrl: '/admin/dict/type/post_level',
      "prop": "residentPostRank",
      "span": 12
    },	  {
      "type": "select",
      "label": "房屋类型",
      search: true,
      "prop": "housingType",
      editDisabled: true,
      rules: [{
        required: true,
        message: '请选择房屋类型',
      }],
      dicUrl: '/admin/dict/type/housing_type',
      "span": 12
    },	  {
      "type": "select",
      search: true,
      addDisplay: false,
      editDisplay: false,
      "label": "合同状态",
      "prop": "contractStatus",
      dicUrl: '/admin/dict/type/housing_contract_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "室内结构",
      "prop": "structure",
      rules: [{
        required: true,
        message: '请选择室内结构',
      }],
      dicUrl: '/admin/dict/type/housing_structure',
      "span": 12
    },	  {
      "type": "select",
      "label": "朝向",
      "prop": "toward",
      rules: [{
        required: true,
        message: '请选择朝向',
      }],
      dicUrl: '/admin/dict/type/housing_toward',
      "span": 12
    },	  {
      "type": "number",
      "label": "建筑面积",
      maxRows: 999,
      rules: [{
        required: true,
        message: "请输入建筑面积",
      }],
      "prop": "constructionArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "套里面积",
      maxRows: 999,
      rules: [{
        required: true,
        message: "请输入套里面积",
      }],
      "prop": "usageArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "分摊面积",
      addDisplay: false,
      slot: true,
      editDisplay: false,
      viewDisplay: false,
      maxRows: 999,
      "prop": "sharingArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "房间面积",
      addDisplay: false,
      slot: true,
      editDisplay: false,
      viewDisplay: false,
      maxRows: 999,
      "prop": "roomArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "计租面积",
      slot: true,
      maxRows: 999,
      "prop": "rentArea",
      "span": 12
    },	  {
      "type": "number",
      "label": "预设租金",
      slot: true,
      maxRows: 10000000,
      "prop": "defaultRent",
      "span": 12
    },	  {
      "type": "input",
      "label": "产权证号",
      maxlength: 48,
      "prop": "propertyNumber",
      "span": 12
    },	  {
      "type": "input",
      "label": "水",
      "prop": "water",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "电",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "prop": "electricity",
      "span": 12
    },	  {
      "type": "input",
      "label": "气",
      hide: true,
      editDisplay: false,
      addDisplay: false,
      "prop": "gas",
      "span": 12
    },	  {
      "type": "input",
      "label": "属权",
      "prop": "property",
      maxlength: 128,
      "span": 12
    },	  {
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      hide: true,
      maxlength: 256,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      hide: true,
      action: "/act/file/upload",
      "label": "结构图",
      "prop": "cover"
    // },	  {
    //   "type": "input",
    //   "label": "附件",
    //   "prop": "attachment",
    //   "span": 12
    // },	  {
    //   "type": "number",
    //   "label": "排序",
    //   "prop": "sort",
    //   hide:true,
    //   maxRows: 1000000,
    //   "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      editDisabled: true,
      addDisplay: false,
      hide: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    }  ]
}
